const express = require('express')
const app = express()

app.use(require('cors')())
app.use(express.json())

require('./plugins/db')(app)

app.use(require('./middleware/sendData'))
app.use('/api/admin', require('./routes/admin/index.js'))

app.listen(3000, () => {
  console.log("server is running at http://localhost:3000")
})